<?php


namespace App\Http\Controllers\Weapp;


use App\Model\GoodsCollect;
use App\Tool\Json;

class Collect extends Auth
{


    /**
     * 关注商品列表
     * Create by PeterYang
     * 2020/05/25 21:49:31
     * Email:904801074@qq.com
     */
    function myCollect(){

        $user_id=resolve('weapp_user')['id'];

        $data=GoodsCollect::with('goods.goods_sku')->has('goods')
            ->where('user_id',$user_id)->orderBy('id','desc')->get();


        return Json::code(1,'success',$data);

    }

}
